package com.jk.controller;


import com.jk.entity.UserEntity;
import com.jk.entity.XsjfEntity;
import com.jk.service.XsjfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/xsjf")
public class XsjfController {

    @Autowired
    private XsjfService xsjfService;

    @RequestMapping("/getXsjf")
    public List<XsjfEntity> getXsjf(){

        return xsjfService.getXsjf();
    }
    @RequestMapping("/UpdStatus")
    public void UpdStatus(Integer id, HttpServletRequest request){
         xsjfService.UpdStatus(id,request);
    }
    @RequestMapping("/getMyxs")
    public List<XsjfEntity> getMyxs(HttpServletRequest request){
         return  xsjfService.getMyxs(request);
    }

    @RequestMapping("/uStatus")
    public void uStatus(Integer id, HttpServletRequest request){
        xsjfService.uStatus(id,request);
    }
    @RequestMapping("/getMyxsAdmin")
    public List<XsjfEntity> getMyxsAdmin(HttpServletRequest request){

        return xsjfService.getMyxsAdmin(request);
    }
    /*完成任务*/
    @RequestMapping("/AdminStatus")
    public void AdminStatus(Integer id,Integer uid,Integer xsintegral){
        xsjfService.AdminStatus(id,uid,xsintegral);
    }

    @RequestMapping("/AdminStatus1")
    public void AdminStatus1(Integer id){
        xsjfService.AdminStatus1(id);
    }
}
